package cn.edu.nju.software.zp13.core.nodeGenerator;

import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;

import cn.edu.nju.software.zp13.core.nodeDescriptor.NodeDescriptor;

public class SimpleElementGenerator extends NodeGenerator{

	public SimpleElementGenerator(Document dom) {
		super(dom);
	}

	@Override
	public void updateDom(Node node, NodeDescriptor descriptor) {
		Element e=dom.createElement(descriptor.getNodeName());
		e.appendChild(dom.createTextNode(getTextNodeContent(descriptor)));
		node.appendChild(e);
	}

}
